Networking Issues Labs
1. Basic Network Configuration
Correct network misconfiguration
Your server is able to communicate with remote systems
After a recent configuration push from your puppet
server, you are unable to reach http://www.opentlc.com/ssh.html.
Investigate and correct this problem.
If you have not already done so, as
rootondesktop1andserver1download and uncompress the lab scripts tarball in/root:[root@server1 ~]# wget http://www.opentlc.com/download/RTlabscripts.tar.gz [root@server1 ~]# tar -xf RTlabscripts.tar.gz
[root@desktop1 ~]# wget http://www.opentlc.com/download/RTlabscripts.tar.gz [root@desktop1 ~]# tar -xf RTlabscripts.tar.gz
On
server1install and uselinksto determine if you can get to the Internet.[root@server1 ~]# yum -y install links [root@server1 ~]# links http://www.opentlc.com/ssh.html
The first time you use links you will get a welcome message; press Enter. You should now see a text version of
http://www.opentlc.com/ssh.html. Press q then Enter to exit links.On
server1installnetworklab1-1.0-1.noarch.rpm, then attempt to accesshttp://www.opentlc.com/ssh.htmlagain.[root@server1 ~]# rpm -i /root/networklab1-1.0-1.noarch.rpm [root@server1 ~]# links http://www.opentlc.com/ssh.html
What broke
Users are unable to connect to
http://www.opentlc.com/ssh.htmlfromserver1. Although this problem may seem familiar, it demonstrates that duplicate problems such as not being able to connect to a server via the network, does not necessarily mean the solutions are the same.Isolate
A thorough inspection of network configuration files and device settings should identify the problem. Before validating network settings, restart network services and validate the output.
[root@server1 ~]# ip a (valid output) [root@server1 ~]# ip route (valid output) [root@server1 ~]# nslookup www.opentlc.com (fails)
Evaluation of output from the above commands identifies there is no issue with network configuration but the resolver is not working. Investigation of more files is required.
[root@server1 ~]# cat /etc/resolv.conf
Observations
Further evaluation of configuration files indicates that the problem is an incorrectly configured
/etc/resolv.conffile. There appears to be one major configuration error where thenameserveris commented out:#nameserver ...
should read:
nameserver ...
Fix
/etc/resolv.conf.
After fixing
resolv.confthe commandlinks http://www.opentlc.com/ssh.htmlshould work, but it still doesn’t.A further discovery of settings on
server1should help identify the problem.Isolate
Inspect resolver related configuration files.
[root@server1 ~]# cat /etc/hosts [root@server1 ~]# cat /etc/resolv.conf [root@server1 ~]# cat /etc/sysconfig/network [root@server1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 [root@server1 ~]# cat /etc/nsswitch.conf
Observations
Inspecting the output of the
cat /etc/nsswitch.confcommand shows that thehosts:configuration does not include DNS. Add DNS back into the configuration by making the line look like this:hosts: files dns
2. Troubleshoot Network Configuration, Round 2
Repair the network following a system crash
System is able to successfully boot and access the network
Over the weekend your system crashed and rebooted and various file system recovery tools ran during the reboot. The tools repaired file system problems and performed other clean ups. After the reboot everything seems to be fine except networking fails to start.
Investigate and correct this problem.
This lab will run on the desktop1 system.
Install the
networklab2-1.0-1.noarch.rpmrpm ondesktop1and reboot.[root@desktop1 ~]# rpm -i networklab2-1.0-1.noarch.rpm [root@desktop1 ~]# reboot
What broke
A recent power outage forced several systems to reboot. Reports have come in to the support center that indicate all systems seem to have reinitialized without error, however,
desktop1is inaccessible over the network.Additional information was reported concerning recent maintenance on
desktop1prior to the outage. Because no details of the maintenance were provided, a more thorough inspection of configuration files as well as scripts and utilities relative to network services should be considered.Isolate
Log in to
desktop1asrootusing the VNC console.Based on the problem statement, the following sequence of commands suggests one approach to validate network settings and identify the problem.
[root@desktop1 ~]# ip addr (no IPv4 address indicates network services have not initialized normally) [root@desktop1 ~]# systemctl restart network (output appears to be correct) [root@desktop1 ~]# ip addr (again no output, this indicates that the scripts executed during the last run of the service command did not execute as expected)
Examine network configuration.
[root@desktop1 ~]# cat /etc/sysconfig/network [root@desktop1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static
Repair
The problem is now evident. Your systems rely on DHCP to get their IP address and BOOTPROTO is set to static.
Set BOOTPROTO to
dhcpand restart networking.BOOTPROTO=dhcp
[root@desktop1 ~]# systemctl restart network
3. Troubleshoot iSCSI Initiator
Correct configuration issue with iSCSI
System correctly boots connected to remote iSCSI target storage
Your server1 system was configured to access an iSCSI target
published by the 192.168.0.254 host using standard network ports.
Another administrator recently made some changes to that system’s disk
configuration and now the iSCSI storage will not mount automatically
when the system boots.
Investigate and correct this problem.
Create ISCSI target on
desktop1host:Log in to the
desktop1host asroot.Create iscsi target on
desktop1:[root@desktop1 ~]# systemctl start target;systemctl enable target [root@desktop1 ~]# targetcli /backstores/fileio create desktop1.example.com.disk1 /tmp/fileio 10M write_back=false /iscsi create iqn.2014-06.com.example:desktop1.example.com /iscsi/iqn.2014-06.com.example:desktop1.example.com/tpg1/acls create iqn.1994-05.com.redhat:ed2b78dbd5d /iscsi/iqn.2014-06.com.example:desktop1.example.com/tpg1/luns create /backstores/fileio/desktop1.example.com.disk1 /iscsi/iqn.2014-06.com.example:desktop1.example.com/tpg1/portals create 192.168.0.1 exit
From the
desktop1system, reset theserver1VM.[root@desktop1 ~]# lab-resetvm
Once the
server1system has come back, log in toserver1asrootvia SSH.Also, via guacamole, open the console for
server1usingvirt-managerondesktop1.Break it (virtual bad system administrator)
Paste the following into
server1(do not fix any errors you see):[root@server1 ~]# iqn=`iscsiadm -m discovery -t st -p 192.168.0.1|cut -f2 -d" "`;iscsiadm -m node -T $iqn -p 192.168.0.1 -l;parted -s /dev/sda mklabel msdos mkpart primary 0% 10MB;mkfs /dev/sda1;UUID=`blkid /dev/sda1|cut -f2 -d\"`;echo "UUID=$UUID /mnt ext4 defaults 1 2" >> /etc/fstab
Reboot
server1.[root@server1 ~]# reboot
Isolate
From the graphical console for
server1you will see that the system no longer fully boots.Power off the VM using
virt-manager, then power it back on.Using what you have learned in earlier labs, start the system in single user mode and
chrootto the proper location.Looking at what stopped during boot and what was changed by the bad system administrator, determine what you need to get the system to boot.
Repair
Network-based disk devices require a
_netdevmount option in/etc/fstab. It appears your co-worker thought he was being helpful by changing the option todefaults.Correct the problem and reboot your machine to confirm the problem is fixed persistently.